function im_h =  VDSR_caffe(im_b,net_model,net_weights, phase,model)
% mycaffe.reset_all();
% caffe.set_mode_gpu();
% caffe.set_device(1);

pre_mynet = caffe.Net(net_model, net_weights, phase);
[height, width, fmnum, num] = size(im_b);  % to gain input picture size,so we need not to change our prototxt evewty time
pre_mynet.blobs('data').reshape([height, width, fmnum, num]);
pre_mynet.reshape();
pre_mynet.forward({im_b});
if strcmp(model,'r')
    im_h = single(pre_mynet.blobs('conv20').get_data()) ;  
else
    im_h = single(pre_mynet.blobs('sum').get_data()) ; % 'sum' 'conv3' sum60_1
end
mycaffe.reset_all();

end